package com.ruoyi.spot.openapi.kline.service.impl;

import java.util.List;

import com.ruoyi.spot.openapi.kline.domain.VO.SpotOpenapiKlineVO;
import com.ruoyi.spot.openapi.lastesttrade.domain.VO.SpotOpenapiLastestTradationVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.spot.openapi.kline.mapper.SpotOpenapiKlineMapper;
import com.ruoyi.spot.openapi.kline.domain.SpotOpenapiKline;
import com.ruoyi.spot.openapi.kline.service.ISpotOpenapiKlineService;

/**
 * K线/蜡烛图Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-12
 */
@Service
public class SpotOpenapiKlineServiceImpl implements ISpotOpenapiKlineService 
{
    @Autowired
    private SpotOpenapiKlineMapper spotOpenapiKlineMapper;

    /**
     * 查询K线/蜡烛图
     * 
     * @param id K线/蜡烛图主键
     * @return K线/蜡烛图
     */
    @Override
    public SpotOpenapiKlineVO selectSpotOpenapiKlineById(Integer id)
    {
        return spotOpenapiKlineMapper.selectSpotOpenapiKlineById(id);
    }

    /**
     * 查询K线/蜡烛图列表
     * 
     * @param spotOpenapiKline K线/蜡烛图
     * @return K线/蜡烛图
     */
    @Override
    public List<SpotOpenapiKlineVO> selectSpotOpenapiKlineList(SpotOpenapiKlineVO spotOpenapiKline)
    {
        return spotOpenapiKlineMapper.selectSpotOpenapiKlineList(spotOpenapiKline);
    }

    /**
     * 新增K线/蜡烛图
     * 
     * @param spotOpenapiKline K线/蜡烛图
     * @return 结果
     */
    @Override
    public int insertSpotOpenapiKline(SpotOpenapiKline spotOpenapiKline)
    {
        return spotOpenapiKlineMapper.insertSpotOpenapiKline(spotOpenapiKline);
    }

    /**
     * 修改K线/蜡烛图
     * 
     * @param spotOpenapiKline K线/蜡烛图
     * @return 结果
     */
    @Override
    public int updateSpotOpenapiKline(SpotOpenapiKline spotOpenapiKline)
    {
        return spotOpenapiKlineMapper.updateSpotOpenapiKline(spotOpenapiKline);
    }

    /**
     * 批量删除K线/蜡烛图
     * 
     * @param ids 需要删除的K线/蜡烛图主键
     * @return 结果
     */
    @Override
    public int deleteSpotOpenapiKlineByIds(Integer[] ids)
    {
        return spotOpenapiKlineMapper.deleteSpotOpenapiKlineByIds(ids);
    }

    /**
     * 删除K线/蜡烛图信息
     * 
     * @param id K线/蜡烛图主键
     * @return 结果
     */
    @Override
    public int deleteSpotOpenapiKlineById(Integer id)
    {
        return spotOpenapiKlineMapper.deleteSpotOpenapiKlineById(id);
    }


    @Override
    public List<SpotOpenapiKlineVO> selectSpotAllData() {
        return spotOpenapiKlineMapper.selectSpotAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return spotOpenapiKlineMapper.queryCurryNumber(currencyPair);
    }


}
